package com.ls.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * <p>
 * 跟进记录表
 * </p>
 *
 * @author pengyu
 * @since 2024-06-28
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
public class BookNote extends Model<BookNote> {
    private static final long serialVersionUID=1L;
    /**
     * 自增主键
     */
    @TableId(value = "book_note_id", type = IdType.AUTO)
    private Long bookNoteId;
    /**联系人id*/
    private Long linkmanId;
    private Long companyId;
    private Long customerId;
    /**预定id，来自booking表,允许为空*/
    private Long bookingId;
    /**信息来源 1电话，2短信，3现场，4微信，5其他 默认1*/
    private Integer bookingSource;
    /**预定状态 1已预定，2已修改，3已到店，4已完成，5已取消，6跟进记录,7预定已经发送短信，8修改已发送短信*/
    private Integer bookingStatus;
    /**预定信息*/
    private String bookingContent;
    /**备注内容，预定id不为空，则备注内容允许为空*/
    private String content;
    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**更新时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    @Override
    protected Serializable pkVal() {
        return this.bookNoteId;
    }
}
